import home from "./components/home.vue";
// import user from './components/user/user.vue';

const user = resolve =>{
    require.ensure(['./components/user/user.vue'],()=>{
        resolve(require('./components/user/user.vue'))
    },'user')
};
const cate = resolve =>{
    require.ensure(['./components/cate/cate.vue'],()=>{
        resolve(require('./components/cate/cate.vue'))
    })
};
const news = resolve =>{
    require.ensure(['./components/news/news.vue'],()=>{
        resolve(require('./components/news/news.vue'))
    })
};
const upload = resolve =>{
    require.ensure(['./components/upload/upload.vue'],()=>{
        resolve(require('./components/upload/upload.vue'))
    })
};
const commits = resolve =>{
    require.ensure(['./components/commits/commits.vue'],()=>{
        resolve(require('./components/commits/commits.vue'))
    })
};
const ceshi = resolve =>{
    require.ensure(['./components/user/ceshi.vue'],()=>{
        resolve(require('./components/user/ceshi.vue'))
    })
};



export const routes = [
    {path:'/',components:{
        default:home,
    },name:'home'},
    {path:'/user',components:{
        default:user,
    }},
    {path:'/cate',components:{
        default:cate,
    }},
    {path:'/news',components:{
        default:news,
    }},
    {path:'/upload',components:{
        default:upload,
    }},
    {path:'/commits/:id',components:{
        default:commits,
    }},
    {path:'/ceshi',components:{
        default:ceshi,
    }}
]